﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/content.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>优惠充值订单</title>
		<script>
		$(document).ready(function(){
			$("#mobile").focus();
			$("#linksForm").validate({
				 rules: { 
					mobile: { 
	        			required: true, 
	        			maxlength:11
	    			},
					phonePassword: { 
						required: true, 
						maxlength:8
					},
	    			amount: { 
						required: true, 
						maxlength:10
					}
				},
				success: function(label) {
					label.html("&nbsp;").addClass("checked");
		        }	
			});
			$("#payment").val('${saleorder.saleType}');
		});	
		
		</script>
	</head>
	<body>
		<div class="rhead">
			<div class="rpos">
				当前位置: 业务管理 - 优惠充值订单 - 添加优惠充值订单
			</div>
			<div class="ropt"><input type="button" value="返回" onclick="history.back()"/></div>			
			<div class="clear"></div>
		</div>
		<form action="saleorderAction!update.action" method="post"
			id="linksForm">
			<input type="hidden"  value="${saleorder.id}"
								name="saleorder.id"  />
			<input type="hidden"  value="${_pageNo}" name="_pageNo"  /><!-- 用于提交表单后，返回编辑前的页面 -->
			<table align="center" class="listTable3" width="90%">
				<tr>
					<td width="100px" class="pn-flabel">
						办理号码
					</td>
					<td>
						<input type="text" class="putMobile" id="custsimno" value="${saleorder.saleNo}"
								name="mobile" maxlength="11" />
					</td>
				</tr>

				<tr>
					<td class="pn-flabel">
						服务密码：
					</td>
					<td>
						<input type="text" class="putMobile" id="custsimno" value="${saleorder.phonePassword}"
													name="phonePassword" maxlength="8" />
					</td>
				</tr>
				<tr>
					<td class="pn-flabel">
						优惠套餐:
					</td>
					<td>
						<select id="payment" type="text" name="saleorder.saleType" style="width:210px;" value="${saleorder.saleType}">
							<c:forEach items="${authoritiesList}" var="auth">
								<option value="${auth.id}">${auth.name}</option>
							</c:forEach>
						</select>
					</td>
				</tr>

				<tr>
					<td class="pn-flabel">
						代  理  价
					</td>
					<td>
						<input type="text" id="sameamount" name="amount" value="${saleorder.discount}"/>
					</td>
				</tr>
				<tr>
					<td class="pn-flabel">
						充值状态
					</td>
					<td>
						<select name="saleorder.phoneState">
							<option value="0">
								待办理
							</option>
							<option value="1" <c:if test="${saleorder.phoneState==1}">selected</c:if>>
								办理中
							</option>
							<option value="2" <c:if test="${saleorder.phoneState==2}">selected</c:if>>
								已成功
							</option>
							<option value="3" <c:if test="${saleorder.phoneState==3}">selected</c:if>>
								已失败
							</option>
						</select>
					</td>
				</tr>
				<tr>
					<td class="pn-flabel">
						付款状态
					</td>
					<td>
						<select name="saleorder.paymentState">
							<option value="1">
								已付款
							</option>
							<option value="0"  <c:if test="${saleorder.paymentState==0}">selected</c:if>>
								未付款
							</option>
						</select>
					</td>
				</tr>
				<tr>
					<td class="pn-flabel">
						状态
					</td>
					<td>
						<select name="saleorder.state">
							<option value="1">
								已启用
							</option>
							<option value="0" <c:if test="${saleorder.state==0}">selected</c:if>>
								已停用
							</option>
						</select>
					</td>
				</tr>
				<tr>
					<td class="pn-flabel">
						备注
					</td>
					<td>
						<textarea rows="5" cols="20" name="saleorder.comments">${saleorder.comments}</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:center">
						<input type="submit" value=" 提 交 " />
						<input type="button" value=" 返回 " onclick="history.back()" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>

